/*
 * $Id: PrefEdit.java,v 1.6 2005/04/15 16:40:48 jppietsch Exp $
 * Copyright (C) 2001 Jan-Peter Pietsch
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */
package de.jppietsch.prefedit;

import de.jppietsch.error.Log;

import javax.swing.*;
import java.util.prefs.BackingStoreException;

/**
 * An editor to edit Java-Preferences.
 *
 * @author Jan-Peter Pietsch
 * @version $Revision: 1.6 $
 */
public class PrefEdit {

    /**
     * Starts the application.
     *
     * @param someArguments No Arguments are supported.
     * @throws BackingStoreException If something goes wrong.
     */
    public static void main(String[] someArguments)
            throws BackingStoreException {
        if (System.getProperty("java.version").compareTo("1.4") < 0) {
            JOptionPane.showMessageDialog(null, Rsc.getBundle().getString(
                    Rsc.JAVA_VERSION_MESSAGE));
            System.exit(1);
        }

        // ConsoleHandler handler = new ConsoleHandler();
        // handler.setLevel(Level.FINEST);
        // Log.LOG.addHandler(handler);
        // Log.LOG.setLevel(Level.FINEST);
        Log.LOG.info("Preferences Editor is starting...");
        JFrame jframe = new JFrame();
        new PrefEditWindow(jframe).setVisible(true);
        jframe.setVisible(true);
    }

}
